package com.baidu.videoseries.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by leiyun on 2018/5/16.
 */
public class MediaBean implements Parcelable {

    private String storyName;
    private String storyId;
    private String storyImg;
    private String author;
    private String albumName;
    private String albumId;
    private String albumImg;
    private int storyNum;
    private String targetUrl;
    private boolean isChecked;
    private String duration;
    private int progress;
    private int fileType;
    private int loadStatus;
    private int playNum;

    public int getPlayNum() {
        return playNum;
    }

    public void setPlayNum(int playNum) {
        this.playNum = playNum;
    }

    private String localPath;
    private String lastPlay;
    private String lastPlayDuration;

    public String getStoryImg() {
        return storyImg;
    }

    public void setStoryImg(String storyImg) {
        this.storyImg = storyImg;
    }

    public String getAlbumId() {
        return albumId;
    }

    public void setAlbumId(String albumId) {
        this.albumId = albumId;
    }

    public String getAlbumImg() {
        return albumImg;
    }

    public void setAlbumImg(String albumImg) {
        this.albumImg = albumImg;
    }

    public String getStoryId() {
        return storyId;
    }

    public void setStoryId(String storyId) {
        this.storyId = storyId;
    }

    public String getStoryName() {
        return storyName;
    }

    public void setStoryName(String storyName) {
        this.storyName = storyName;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAlbumName() {
        return albumName;
    }

    public void setAlbumName(String albumName) {
        this.albumName = albumName;
    }

    public String getTargetUrl() {
        return targetUrl;
    }

    public void setTargetUrl(String targetUrl) {
        this.targetUrl = targetUrl;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public int getStoryNum() {
        return storyNum;
    }

    public void setStoryNum(int storyNum) {
        this.storyNum = storyNum;
    }

    public int getProgress() {
        return progress;
    }

    public void setProgress(int progress) {
        this.progress = progress;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getLoadStatus() {
        return loadStatus;
    }

    public void setLoadStatus(int loadStatus) {
        this.loadStatus = loadStatus;
    }

    public String getLocalPath() {
        return localPath;
    }

    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    public String getLastPlay() {
        return lastPlay;
    }

    public void setLastPlay(String lastPlay) {
        this.lastPlay = lastPlay;
    }

    public String getLastPlayDuration() {
        return lastPlayDuration;
    }

    public void setLastPlayDuration(String lastPlayDuration) {
        this.lastPlayDuration = lastPlayDuration;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.storyName);
        dest.writeString(this.storyId);
        dest.writeString(this.storyImg);
        dest.writeString(this.author);
        dest.writeString(this.albumName);
        dest.writeString(this.albumId);
        dest.writeString(this.albumImg);
        dest.writeInt(this.storyNum);
        dest.writeString(this.targetUrl);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
        dest.writeString(this.duration);
        dest.writeInt(this.progress);
        dest.writeInt(this.fileType);
        dest.writeInt(this.loadStatus);
        dest.writeInt(this.playNum);
        dest.writeString(this.localPath);
        dest.writeString(this.lastPlay);
        dest.writeString(this.lastPlayDuration);
    }

    public MediaBean() {
    }

    protected MediaBean(Parcel in) {
        this.storyName = in.readString();
        this.storyId = in.readString();
        this.storyImg = in.readString();
        this.author = in.readString();
        this.albumName = in.readString();
        this.albumId = in.readString();
        this.albumImg = in.readString();
        this.storyNum = in.readInt();
        this.targetUrl = in.readString();
        this.isChecked = in.readByte() != 0;
        this.duration = in.readString();
        this.progress = in.readInt();
        this.fileType = in.readInt();
        this.loadStatus = in.readInt();
        this.playNum = in.readInt();
        this.localPath = in.readString();
        this.lastPlay = in.readString();
        this.lastPlayDuration = in.readString();
    }

    public static final Creator<MediaBean> CREATOR = new Creator<MediaBean>() {
        @Override
        public MediaBean createFromParcel(Parcel source) {
            return new MediaBean(source);
        }

        @Override
        public MediaBean[] newArray(int size) {
            return new MediaBean[size];
        }
    };
}
